import random
bags=[[],[],[]]
balls=[1,2,3,4,5,6,7,8,9]
for ball in balls:
    index = random.randint(0,2)
    bags[index].append(ball)
i=1
for bag in bags:
    print("包%d里球个数为:%d"%(i,len(bag)))
    i +=1
    for ball in bag :
        print("%d"%ball,end="\t")
    print()

